import unittest
from parameterized import parameterized
from api.hirm import show_user
import json
from utils import DataBaseHandle
from api.hirm import Hrm_Login
from app import MysqlDatabase,MysqlHost,MysqlPassword,MysqlPort,MysqlUsername
DbHandle = DataBaseHandle(MysqlHost, MysqlUsername, MysqlPassword, MysqlDatabase, MysqlPort )


class TestHrm(unittest.TestCase):

    def testuser(self):
        total = show_user().get('data').get('total')
        data = len(DbHandle.select_info('select * from bs_user where company_id=1'))
        self.assertEqual(int(total),data)



if __name__ == '__main__':
    unittest.main()
